import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lily
 * Date: 2024-10-15
 * Time: 19:24
 */
public class test_1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int num = in.nextInt();
            StringBuffer ret = new StringBuffer();
            int n = 0;
            while (num != 0) {
                if (n == 3) {
                    ret.insert(0, ',');
                    n = 0;
                }
                int m = num % 10;
                ret.insert(0, m);
                n++;
                num /= 10;
            }
            System.out.println(ret.toString());
        }
    }
}
